<?php
header("Content-type: text/html; charset=utf-8");
ini_set('display_errors',1);
set_time_limit(0); 
include_once dirname(dirname(__FILE__)).'/mgtv_init.php';
//include_once dirname(dirname(__FILE__)) . '/init.php';
$db = nn_get_db(NL_DB_WRITE);
$sql = "select * from nns_mgtvbk_clip_task " .
				"where  (ISNULL(nns_state) or nns_state='' or nns_state='add')  " .
				"order by nns_create_time asc limit 100";
		
$task_info =  nl_db_get_one($sql,$db);
		//print_r($task_info);
if($task_info == false) die('no task');


$id = np_guid_rand();
echo $task_info['nns_org_id'];
$url = "http://127.0.0.1/cms/mgtv/".$task_info['nns_org_id']."/clip.php?nns_func=report_clip_status&nns_task_id=".$task_info['nns_id']."&nns_state=ok&nns_new_dir=2&nns_date=".date('Ymd')."&nns_path=/internettv/".date('Ymd')."/".$id.".ts&nns_file_size=496566280&nns_file_md5=647175722C1FDC07ECE35871EC45E43D&nns_kbps=0&nns_cdn_policy=CDN1&nns_file_hit=local";
//die($url);
file_get_contents($url);





//
?>